foreach (CompCar car in MCI.Info)
{
Players NPL;
if (_players.TryGetValue(car.PLID, out NPL))
{
var pathx = car.X / 196608;
var pathy = car.Y / 196608;
var direction = car.Direction / 180;
}
foreach(clsConn Conn in Connections)
{
// Pit EXIT
if (pathx >= -27 && pathx <= -24 && pathy >= 65 && pathy <= 67)
{
if (Conn.ExitZone == 0)
{
if (direction > 330 || direction < 20)
{
MessageToAll(_players[car.PLID].PName + " was fined ^1€500 ^7for wrong exit");
Conn.Cash -= 500;
Conn.ExitZone = 1;
}
if (Conn.ExitZone == 1)
{
MessageToUCID(_players[car.PLID].UCID, " ^1!!! Next time you will be kicked ^1!!!");
}
}
else // (Conn.ExitZone == 2)
{
SpecID(_players[car.PLID].PName);
}
}
else
{
if (Conn.ExitZone == 1)
{
Conn.ExitZone = 0;
}
}
}
}
foreach(clsConn Conn in Connections)
{
// Pit EXIT
if (pathx >= -27 && pathx <= -24 && pathy >= 65 && pathy <= 67)
{
if (Conn.ExitZone == 0)
{
if (direction > 330 || direction < 20)
{
MessageToAll(_players[car.PLID].PName + " was fined ^1€500 ^7for wrong exit");
Conn.Cash -= 500;
Conn.ExitZone = 1;
}
if (Conn.ExitZone == 1)
{
MessageToUCID(_players[car.PLID].UCID, " ^1!!! Next time you will be kicked ^1!!!");
}
}
else // (Conn.ExitZone == 2)
{
SpecID(_players[car.PLID].PName);
}
}
else
{
if (Conn.ExitZone == 1)
{
Conn.ExitZone = 0;
}
}
}